home *** CD-ROM | disk | FTP | other *** search
/ The Trig Explorer / The Trig Explorer.iso / mac / Explorer / SINE-PUZ.dxr / 00079.ls < prev    next >
Encoding:
Text File  |  1998-07-22  |  6.0 KB  |  191 lines

  1. global S6, S7, S8, S9, S10, S11, AA, AB, AC, BA, BB, BC, CA, CB, CC, DA, DB, DC
  2.  
  3. on enterFrame
  4.   puppetSprite(6, 1)
  5.   puppetSprite(7, 1)
  6.   puppetSprite(8, 1)
  7.   puppetSprite(9, 1)
  8.   puppetSprite(10, 1)
  9.   puppetSprite(11, 1)
  10.   set An1 to numToChar(the castNum of sprite 15 + 12)
  11.   set An2 to numToChar(the castNum of sprite 16 + 12)
  12.   if (S6 = (An1 & An2)) or (S6 = (An2 & An1)) then
  13.     set the castNum of sprite 6 to cast "YES"
  14.   else
  15.     set the castNum of sprite 6 to cast S6
  16.   end if
  17.   updateStage()
  18.   PS6()
  19.   set An1 to numToChar(the castNum of sprite 21 + 12)
  20.   set An2 to numToChar(the castNum of sprite 22 + 12)
  21.   if (S7 = (An1 & An2)) or (S7 = (An2 & An1)) then
  22.     set the castNum of sprite 7 to cast "YES"
  23.   else
  24.     set the castNum of sprite 7 to cast S7
  25.   end if
  26.   updateStage()
  27.   PS7()
  28.   set An1 to numToChar(the castNum of sprite 17 + 12)
  29.   set An2 to numToChar(the castNum of sprite 18 + 12)
  30.   if (S8 = (An1 & An2)) or (S8 = (An2 & An1)) then
  31.     set the castNum of sprite 8 to cast "YES"
  32.   else
  33.     set the castNum of sprite 8 to cast S8
  34.   end if
  35.   updateStage()
  36.   PS8()
  37.   set An1 to numToChar(the castNum of sprite 23 + 12)
  38.   set An2 to numToChar(the castNum of sprite 24 + 12)
  39.   if (S9 = (An1 & An2)) or (S9 = (An2 & An1)) then
  40.     set the castNum of sprite 9 to cast "YES"
  41.   else
  42.     set the castNum of sprite 9 to cast S9
  43.   end if
  44.   updateStage()
  45.   PS9()
  46.   set An1 to numToChar(the castNum of sprite 19 + 12)
  47.   set An2 to numToChar(the castNum of sprite 20 + 12)
  48.   if (S10 = (An1 & An2)) or (S10 = (An2 & An1)) then
  49.     set the castNum of sprite 10 to cast "YES"
  50.   else
  51.     set the castNum of sprite 10 to cast S10
  52.   end if
  53.   updateStage()
  54.   PS10()
  55.   set An1 to numToChar(the castNum of sprite 25 + 12)
  56.   set An2 to numToChar(the castNum of sprite 26 + 12)
  57.   if (S11 = (An1 & An2)) or (S11 = (An2 & An1)) then
  58.     set the castNum of sprite 11 to cast "YES"
  59.   else
  60.     set the castNum of sprite 11 to cast S11
  61.   end if
  62.   updateStage()
  63.   PS11()
  64. end
  65.  
  66. on PS6
  67.   set xA to the left of sprite 6 + 1
  68.   set yA to the bottom of sprite 6 - 48
  69.   set A1 to value(char 1 of S6 & "A")
  70.   set B1 to value(char 1 of S6 & "B")
  71.   set C1 to value(char 1 of S6 & "C")
  72.   set A2 to value(char 2 of S6 & "A")
  73.   set B2 to value(char 2 of S6 & "B")
  74.   set C2 to value(char 2 of S6 & "C")
  75.   set the trails of sprite 27 to 1
  76.   repeat with n = 1 to 89
  77.     set x to n * 2.0 * PI / 180.0
  78.     set x1 to (n * 2) + xA
  79.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  80.     set the locH of sprite 27 to x1
  81.     set the locV of sprite 27 to y1
  82.     updateStage()
  83.   end repeat
  84.   set the trails of sprite 27 to 0
  85. end
  86.  
  87. on PS7
  88.   set xA to the left of sprite 7 + 1
  89.   set yA to the bottom of sprite 7 - 48
  90.   set A1 to value(char 1 of S7 & "A")
  91.   set B1 to value(char 1 of S7 & "B")
  92.   set C1 to value(char 1 of S7 & "C")
  93.   set A2 to value(char 2 of S7 & "A")
  94.   set B2 to value(char 2 of S7 & "B")
  95.   set C2 to value(char 2 of S7 & "C")
  96.   set the trails of sprite 28 to 1
  97.   repeat with n = 1 to 89
  98.     set x to n * 2.0 * PI / 180.0
  99.     set x1 to (n * 2) + xA
  100.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  101.     set the locH of sprite 28 to x1
  102.     set the locV of sprite 28 to y1
  103.     updateStage()
  104.   end repeat
  105.   set the trails of sprite 28 to 0
  106. end
  107.  
  108. on PS8
  109.   set xA to the left of sprite 8 + 1
  110.   set yA to the bottom of sprite 8 - 48
  111.   set A1 to value(char 1 of S8 & "A")
  112.   set B1 to value(char 1 of S8 & "B")
  113.   set C1 to value(char 1 of S8 & "C")
  114.   set A2 to value(char 2 of S8 & "A")
  115.   set B2 to value(char 2 of S8 & "B")
  116.   set C2 to value(char 2 of S8 & "C")
  117.   set the trails of sprite 29 to 1
  118.   repeat with n = 1 to 89
  119.     set x to n * 2.0 * PI / 180.0
  120.     set x1 to (n * 2) + xA
  121.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  122.     set the locH of sprite 29 to x1
  123.     set the locV of sprite 29 to y1
  124.     updateStage()
  125.   end repeat
  126.   set the trails of sprite 29 to 0
  127. end
  128.  
  129. on PS9
  130.   set xA to the left of sprite 9 + 1
  131.   set yA to the bottom of sprite 9 - 48
  132.   set A1 to value(char 1 of S9 & "A")
  133.   set B1 to value(char 1 of S9 & "B")
  134.   set C1 to value(char 1 of S9 & "C")
  135.   set A2 to value(char 2 of S9 & "A")
  136.   set B2 to value(char 2 of S9 & "B")
  137.   set C2 to value(char 2 of S9 & "C")
  138.   set the trails of sprite 30 to 1
  139.   repeat with n = 1 to 89
  140.     set x to n * 2.0 * PI / 180.0
  141.     set x1 to (n * 2) + xA
  142.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  143.     set the locH of sprite 30 to x1
  144.     set the locV of sprite 30 to y1
  145.     updateStage()
  146.   end repeat
  147.   set the trails of sprite 30 to 0
  148. end
  149.  
  150. on PS10
  151.   set xA to the left of sprite 10 + 1
  152.   set yA to the bottom of sprite 10 - 48
  153.   set A1 to value(char 1 of S10 & "A")
  154.   set B1 to value(char 1 of S10 & "B")
  155.   set C1 to value(char 1 of S10 & "C")
  156.   set A2 to value(char 2 of S10 & "A")
  157.   set B2 to value(char 2 of S10 & "B")
  158.   set C2 to value(char 2 of S10 & "C")
  159.   set the trails of sprite 31 to 1
  160.   repeat with n = 1 to 89
  161.     set x to n * 2.0 * PI / 180.0
  162.     set x1 to (n * 2) + xA
  163.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  164.     set the locH of sprite 31 to x1
  165.     set the locV of sprite 31 to y1
  166.     updateStage()
  167.   end repeat
  168.   set the trails of sprite 31 to 0
  169. end
  170.  
  171. on PS11
  172.   set xA to the left of sprite 11 + 1
  173.   set yA to the bottom of sprite 11 - 48
  174.   set A1 to value(char 1 of S11 & "A")
  175.   set B1 to value(char 1 of S11 & "B")
  176.   set C1 to value(char 1 of S11 & "C")
  177.   set A2 to value(char 2 of S11 & "A")
  178.   set B2 to value(char 2 of S11 & "B")
  179.   set C2 to value(char 2 of S11 & "C")
  180.   set the trails of sprite 32 to 1
  181.   repeat with n = 1 to 88
  182.     set x to n * 2.0 * PI / 180.0
  183.     set x1 to (n * 2) + xA
  184.     set y1 to yA - ((18.0 * A1 * sin((B1 * x) + (C1 * PI / 180.0))) + (18.0 * A2 * sin((B2 * x) + (C2 * PI / 180.0))))
  185.     set the locH of sprite 32 to x1
  186.     set the locV of sprite 32 to y1
  187.     updateStage()
  188.   end repeat
  189.   set the trails of sprite 32 to 0
  190. end
  191.